<?php

namespace App\Http\Requests\Validators\Backend\Order;

use App\Http\Requests\Validators\BaseValidator;

class OrderValidator extends BaseValidator
{
    public function storeRules()
    {
        return [
            'object_id' => 'required | numeric',
            'type' => 'required | numeric | in:1,2',
        ];
    }

    public function editRules()
    {
        return [
            'status' => 'in:1,2',
        ];
    }

    public function searchRules()
    {

        return [
            // 'user_name' => 'string | max:50',
            // 'corporation_name' => 'string | max:100',
            // 'corporation_card_id' => 'string | max:100',
            // 'name' => 'string | max:50',
            // 'province_id' => 'numeric',
            // 'city_id' => 'numeric',
            // 'area_id' => 'numeric',
            // 'serve_begin_time' => ' date_format:Y-m-d H:i:s',
            // 'serve_end_time' => 'date_format:Y-m-d H:i:s',
            // 'introduction' => '',
            'order_sn' => 'string',
            'order_status' => 'in:1,2',
            'type' => 'in:1,2',
            'order_id' => 'numeric',
            'status' => 'in:1,2',
            'begin_time' => 'date_format:Y-m-d H:i:s',
            'end_time' => 'date_format:Y-m-d H:i:s',
        ];
    }
}
